package compte;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

public class TextFile {

	private String [] s ;

	public  TextFile(String fileName) throws IOException { 

		BufferedReader in = new BufferedReader( new FileReader(fileName));
		int  nbLines = 0;
		while( in.readLine()!= null) 
			nbLines++ ; 
		in.close();

		BufferedReader in2 = new BufferedReader( new FileReader(fileName));
		s = new String [nbLines]; 
		for(int i = 0; i < nbLines; i++){ 
			s[i] = in2.readLine();
		}
		in2.close();
	}
	static String [] GetFileNames(String dirname){
		String [] list;
		File path = new File(dirname); 
		
		list = path.list(); 
		
		return list ;	
		}
	public String [] Get() { 	return s ;	}	
}
